<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>分享APP</title>
		<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection">
		<link rel="stylesheet" href="css/weui.css">
		<link rel="stylesheet" href="css/jquery-weui.css">
		<link rel="stylesheet" href="css/style.css">
	</head>

	<body>
		<div class="overlay open">
			<div class="overlay-content scrolling unlogin">
				<div class="unlogin-bg-wrapper"></div>
				<div class="unlogin-wrapper" style="-webkit-transform: translate(-50%,-50%);">
					<div class="logo">
						<img src="images/logoHMS-v3.png" alt="">
					</div>
					<div class="wallet">
						<div class="title">钱包注册成功</div>
						<div class="content">
							<div class="src">长按二维码下载钱包APP</div>
							<div class="img">
								<div id="code" align="center">

								</div>
							</div>
						</div>
						<div class="weui-flex weui-list-btm">
							<div class="weui-flex__item">
								<a class="weui-btn weui-btn_plain-confirm" id="hr">点击下载</a>
							</div>
						</div>
					</div>

				</div>

			</div>
		</div>
		<script src="js/jquery.min.js"></script>
		<script src="js/jquery-weui.min.js"></script>
		<script src="js/jquery.qrcode.min.js"></script>
		<script src="controller/base.js"></script>
	</body>
	<script>
		// 获取终端的相关信息
		var Terminal = {
			// 辨别移动终端类型
			platform: function() {
				var u = navigator.userAgent,
					app = navigator.appVersion;
				return {
					// android终端或者uc浏览器
					android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
					// 是否为iPhone或者QQHD浏览器
					iPhone: u.indexOf('iPhone') > -1,
					// 是否iPad
					iPad: u.indexOf('iPad') > -1
				};
			}(),
			language: (navigator.browserLanguage || navigator.language).toLowerCase()
		}

		// 根据不同的终端，选择不同的二维码
		if(Terminal.platform.android) {
			$("#code").qrcode({
				render: "canvas",
				width: 200,
				height: 200,
				text: ip + "appDownloads/HMS.apk"
			});
			$("#hr").attr("href", ip + "appDownloads/HMS.apk");
		} else {
			$("#code").qrcode({
				render: "canvas",
				width: 200,
				height: 200,
				text: ip + "appDownloads/HMS.ipa"
			});
			$("#hr").attr("href", ip + "appDownloads/HMS.ipa");
		}
	</script>

</html>